package one.stand.feign;

import one.stand.fallback.CrmFallBack;
import one.stand.model.ResultModel;
import one.stand.request.*;
import one.stand.response.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author Administrator
 */
@Component
@FeignClient(value = "crm-service", fallback = CrmFallBack.class, decode404 = true)
public interface CrmFegin {

    @PostMapping("company/getCompanyId")
    ResultModel<CompanyResponse> getCompanyId(@RequestBody CompanyRequest request);

    /**
     * 得到名片二维码
     */
    @PostMapping("/businessCard/getWxTwoCode")
    ResultModel getWxTwoCode(@RequestBody BusinessCardRequest request);

    /**
     * 验证名片是否过期
     */
    @PostMapping("/businessCard/verifyExpired")
    ResultModel<Long> verifyExpired(@RequestBody BusinessCardRequest request);

    /**
     * 得到名片海报
     * @param request
     * @return
     */
    @PostMapping("businessCard/getCardPoster")
    ResultModel getCardPoster(@RequestBody BusinessCardRequest request);


    @PostMapping("notice/selectEffectiveList")
    ResultModel<List<NoticeResponse>> selectEffectiveList(@RequestBody NoticeRequest request);



}
